<?php
/**
*公共配置
**/
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set('PRC');
require_once(dirname(__FILE__).'/../../include/rnpdo.class.php');
$act = isset($_GET['act']) ? $_GET['act'] : 'list';
/*手机充值记录*/
if($act == 'list')
{
  $row = $rnpdo->RnFetchAll("select * from sn_app_card_20190301_studrites order by id DESC limit 10 ");
  print_r($row);
}
/*游戏充值记录*/
elseif($act == 'log')
{
	$row = $rnpdo->RnFetchAll("select * from sn_app_card_20190301_rites_log order by id DESC limit 10 ");
	print_r($row);

}
elseif($act == 'sms')
{
	require_once(dirname(__FILE__).'/common/sms.php');
            $SendSms = new SendSms();
            $mobile        = '15829337275'; //接收短信的手机号码
            $boc           = 'SN'; //行标示
            $salt          = 'OISIOFIOSL'; //约定生成签名的盐值
            $signName      = '闰能科技'; //短信签名
            $templateCode  = 'SMS_152284975'; //短信模板ID
            $templateParam = array('info' => '测试', 'remark' => '警戒值'); //短信模板参数，数组键名必须与短信模板中的变量名一致
            $remark        = '测试'; //备注，用于区分活动
            $t1 = microtime(true);
            $result        = $SendSms->requestApi($mobile, $boc, $salt, $signName, $templateCode, $templateParam, $remark); //调用SendSms的requestApi方法发送短信
            $t2 = microtime(true);
		    echo '耗时'.round($t2-$t1,3).'秒<br>';
		    echo 'Now memory_get_usage: ' . memory_get_usage() . '<br />';
            print_r($result); //打印发送结果信息
}